﻿using System;
using System.Windows.Forms;
using ku.textumbruch.contract;

namespace ku.portal {

    public partial class UI : Form, WinFormsHost.IEntryPoint {

        private readonly ITextumbruch textUmbruch;

        public UI( ITextumbruch textUmbruch) {

            this.textUmbruch = textUmbruch;
            InitializeComponent();
        }

        private void doTrennen_Click(object sender, EventArgs e) {
            text.Text = textUmbruch.Umbreche(text.Text, (int)this.zeilenLänge.Value);
        }

        #region IEntryPoint Members
        public Form MainForm {
            get { return this; }
        }
        #endregion
    }
}
